package com.hentie.spritelib;

import java.util.ArrayList;
import java.util.Dictionary;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class SpriteData {
	
	public class SpriteFrameInfo
	{
        //Store the co-ordinates in OpenGL format (which is basically normalised to 0-1.0)
        public float textureX, textureY;
        //store the sprite width
        public float spriteWidth, spriteHeight;
        //The size of the plane
        public float planeWidth, planeHeight;
        //The delay of the specific frame
        public int frameDelay;
        //The offset of the associated frame
        public float offsetX, offsetY;
        
        public SpriteFrameInfo(float texX,float texY,float spriteWidth,float spriteHeight,float planeWidth,float planeHeight,int frameDelay, float offsetX, float offsetY)
        {
        	this.textureX = texX;
        	this.textureY = texY;
        	this.spriteWidth = spriteWidth;
        	this.spriteHeight = spriteHeight;
        	this.planeWidth = planeWidth;
        	this.planeHeight = planeHeight;
        	this.frameDelay = frameDelay;
        	this.offsetX = offsetX;
        	this.offsetY = offsetY;
        }
        
	}

	public class SpriteAnimationInfo
	{
        public int first, last;
        public SpriteAnimationInfo(int f, int l) { first = f; last = l; } // quick and dirty contructor
	}

	
    //The texture belonging to the sprite
    public String TextureName;
    public int textureID;
    //Total number of frames
    public int totalFrames;
    //and animationd
    public int totalAnimations;



    //This container stores the frame data
    public List<SpriteFrameInfo> SpriteFrame = new ArrayList<SpriteFrameInfo>();
    //This container stores what animations we have
    public Map<String, SpriteAnimationInfo> SpriteAnimation = new HashMap<String, SpriteAnimationInfo>();
	
}
